
	<div class="results">
	<? while($c = mysql_fetch_assoc($result)) { 
		if (!searchbreak($c,"",'<br style=clear:left />')) {
			continue; //skip this image!
		}
	
	 ?>
		<div style="clear:left; border-top:1px solid #eeeeee">
		  <div style="float:left;position:relative; width:130px; margin-right:10px">
		  <div align="center">
		  <a title="<? ehec('grid_reference'); ?> : <? ehec('title'); ?> by <? ehec('realname'); ?> - click to view full size image" href="http://www.geograph.org.uk/photo/<? echo $c['gridimage_id']; ?>"><img src="<? echo gGUc($c); ?>"/></a></div>
		  </div>
		  
		  <big><a href="http://www.geograph.org.uk/gridref/<? ehec('grid_reference'); ?>"><tt><? ehec('grid_reference'); ?></tt></a>
		  <b><a href="http://www.geograph.org.uk/photo/<? echo $c['gridimage_id']; ?>"><? ehec('title'); ?></a></b></big>
		   by <a href="<? echo linktoself(array('bi_id'=>$c['user_id'],'delete'=>'page')); ?>"><? ehec('realname'); ?></a><br/>
		 
		  Taken: <?
		  	$bits = explode('-',$c['imagetaken']);
		  	$str = '';
		  	foreach ($bits as $idx => $bit) {
		  		if ($idx > 0) { echo "-"; $str .= '-'; }
		  		$str .= $bit;
		  		print "<a href=\"".linktoself(array('taken'=>$str,'delete'=>'page'))."\">$bit</a>";
		  	} ?>
		  Category: <a href="<? echo linktoself(array('category'=>$c['imageclass'],'delete'=>'page')); ?>"><? ehec('imageclass'); ?></a> 
		  <?
			if ($GLOBALS['portal_id'] == 111) {
				print " (<a href=\"http://www.geograph.org.uk/finder/sqim.php?q=".urlencode($c['imageclass'])."+locality:Wales\" style=\"font-weight:normal\">More like this</a>)";
			}

		  if (!empty($c['comment'])) {
		  	print "<br/>".hec('comment');
		  } ?>
		  <br style="clear:left"/>
		</div>
	<? } 
	searchbreak($c,'','<br style=clear:left />'); ?>
	
	</div>
